package algorithm;

public class Utils {
    public static void printArray(int[] arr) {
        for (int i = 0;i<arr.length;i++) {
            System.out.println(arr[i]);
        }
    }
    public static int[] copyArray(int[] arr) {
        int[] res = new int[arr.length];
        for (int i = 0;i<arr.length;i++) {
            res[i] = arr[i];
        }
        return res;
    }

    public static void swap(int[] arr, int i, int j) {
        arr[i]= arr[i]^arr[j];
        arr[j]= arr[i]^arr[j];
        arr[i]= arr[i]^arr[j];
    }
}
